package com.ciaojian.client.controller;

import com.ciaojian.client.service.AdvertisementServiceImpl;
import com.ciaojian.core.util.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Atlakyn
 */
@Api(tags = "弹窗广告")
@RestController
@RequestMapping("/advertisements")
public class AdvertisementController {
    @Resource
    private AdvertisementServiceImpl advertisementService;

    @ApiOperation("获取弹窗广告")
    @GetMapping
    public Result get(Integer userId) {
        return Result.ok(advertisementService.popSet(userId));
    }
}